<?php
include_once '../Algos/Window/deperditionWindows.php';
include_once '../Algos/Wall/deperditionWalls.php';
include_once '../Objects/Wall.php';
include_once '../Objects/House.php';
include_once '../Objects/Window.php';

 
 try
  {
    $Mysql = new DBAccess('153.109.141.81:3306', 'savenrj', 'root', '');
    
    $windows1 = array();
    $windows1[0] = new Window(1, 1, 2, true, 2 , 2.2 , 0.22, 0.1, 0.15, '', '', '', '');
    $windows1[1] = new Window(1, 1, 2, true, 2 , 2.2 , 0.22, 0.1, 0.15, '', '', '', '');
    
    $windows2 = array();
    $windows2[0] = new Window(1, 1, 2, true, 2 , 2.2 , 0.22, 0.1, 0.15, '', '', '', '');
    $windows2[1] = new Window(1, 1, 2, true, 2 , 2.2 , 0.22, 0.1, 0.15, '', '', '', '');
    
    
    
    $walls = array();
    $walls[0] = new Wall('M1', 1, 1, 60, '', $windows1, '');
    //$walls[1] = new Wall('M2', 2, 2, 60, '', $windows2, '');

    
    
    $house;
 $house = new House(4, 1, 1, 2, 150, 200, '', '', '', '', '', 77, 20, 2, 1975, $walls, false, false);
     //$house = new House(4, 1, 1, 'square', 'Sion', 20, 2, 1970, 150 , 30, $walls, false , false);

    
    
    $algo;
    $algo = new AlgoWindows();
    
    $algo2;
    $algo2 = new AlgoMur();
    
    echo 'TotalWin : '.$algo2->getTotalSurfaceWindows($walls);
   
    echo '<br></br>Déperdition totale';
    echo 'fffffffffff : '.$algo->getTotalDepertitionWindows($house);
    
     echo '<br></br>Surface';
    echo $algo->getSurface($windows1[0]);
    
    echo '<br></br>Uwf';
    echo $algo->getUwf($windows1[0], 1975);
    
    echo '<br></br>Uff';
    echo $algo->getUff($windows1[0]);
            
    echo '<br></br>Ugf';
    echo $algo->getUgf($windows1[0]);
    
    echo '<br></br>Ustf';
    echo $algo->getUstf(1975);
    
    echo '<br></br>SRE';
    echo $algo->getSRE($house);
    
    echo '<br></br>A1 ';
    echo $windows1[0]->A1;
    echo '<br></br>A2 ';
    echo $windows1[0]->A2;
    echo '<br></br>A3 ';
    echo $windows1[0]->A3;
    echo '<br></br>A4 ';
    echo $windows1[0]->A4;
    echo '<br></br>A5 ';
    echo $windows1[0]->A5;
    
    echo '<br></br>LT1 ';
    echo $windows1[0]->LT1;
    echo '<br></br>LT2 ';
    echo $windows1[0]->LT2;
    echo '<br></br>LT3 ';
    echo $windows1[0]->LT3;
    echo '<br></br>LT4 ';
    echo $windows1[0]->LT4;
    echo '<br></br>LT5 ';
    echo $windows1[0]->LT5;
    echo '<br></br>LT6 ';
    echo $windows1[0]->LT6;
    
    echo '<br></br>L1 ';
    echo $windows1[0]->l1;
    echo '<br></br>L6 ';
    echo $windows1[0]->l6;
 
  
   
    
  }
  catch (MySQLExeption $e) 
  {
    echo $e -> RetourneErreur();
  }
?>
